﻿using System;
using System.Globalization;
using System.Windows;
using System.Windows.Data;
using System.Windows.Media;

namespace ControleRepresentanteSync.View.Pedido
{
    public partial class PedidoView
    {
        public PedidoView()
        {
            InitializeComponent();
        }
    }

    internal class NullBackgroundConverter : DependencyObject, IValueConverter
    {
        public static readonly DependencyProperty ColorProperty = 
            DependencyProperty.Register("Color", typeof (Brush), typeof (NullableBoolConverter));

        public Brush Color
        {
            get { return (Brush) GetValue(ColorProperty); }
            set { SetValue(ColorProperty, value); }
        }

        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return value == null ? Color : Brushes.Transparent;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
